package com.yzc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.yzc.model.entity.system.RegisterUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface RegisterMapper extends BaseMapper<RegisterUser> {

   @Insert("INSERT into t_user(username,password) SELECT #{username},#{password} WHERE not EXISTS (SELECT * FROM t_user WHERE username = #{username})")
   int addUser(RegisterUser user);


}
